import java.security.InvalidKeyException;import java.security.NoSuchAlgorithmException;import javax.crypto.BadPaddingException;import javax.crypto.IllegalBlockSizeException;import javax.crypto.NoSuchPaddingException;public class CryptoSystem {	private Encryption algorithm;	public CryptoSystem(String encryptionType) throws Exception {		if (encryptionType.equalsIgnoreCase("Enterprise"))			algorithm = new EnterpriseEncryption();		else if (encryptionType.equalsIgnoreCase("Personal"))			algorithm = new PersonalEncryption();		else			algorithm = new MilitaryEncryption();	}	public String encryptDoc(String string, Ciphers.CryptoKey key) {		return algorithm.encrypt(string, key);	}		public String decryptDoc(String string, Ciphers.CryptoKey key) {		return algorithm.decrypt(string, key);	}}